﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using ThietBiSo.LinQDB;
using ThietBiSo.Models;
using ThietBiSo.UrlReview;

namespace ThietBiSo.Controllers
{
    public class xdController : ApplicationController
    {
      
        MXayDung mxd = new MXayDung();
        MXayDung_DanhMuc mdm = new MXayDung_DanhMuc();
        SEOUrl seo = new SEOUrl();
        //
        // GET: /xd/

       

        public ActionResult xd(string id)
        {
            ViewData["title"] = mdm.GetTenXaydung_DanhMuc(int.Parse(seo.CatChuoi(id)));
            ViewData["xaydungs"] = mxd.GetListSPByMaDM(int.Parse(seo.CatChuoi(id)));
            return View();
        }
        public ActionResult chitiet(string id)
        {
            SEOUrl s = new SEOUrl();
            ViewData["chitiets"] = mxd.ChiTiet(int.Parse(s.CatChuoi(id)));
            ViewData["title"] = mxd.GetTitleByMa(int.Parse(s.CatChuoi(id)));
            return View();
        }

    }
}
